package com.steel.yfmall.cloud.assistant.view.impl;

import com.steel.yfmall.cloud.assistant.po.view.OutCallApiLogBean;
import com.steel.yfmall.cloud.assistant.view.OutCallApiLogBeanService;
import com.steel.yfmall.cloud.assistant.view.mapper.OutCallApiLogBeanMapper;
import com.steel.yfmall.cloud.components.utils.utils.UtilDate;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author yuchaohua
 * @version V1.0
 * @Title: OutCallApiLogBeanServiceImpl
 * @Package com.steel.yfmall.cloud.assistant.view.impl
 * @Description: (用一句话描述该文件做什么)
 * @date 2021/1/22 17:23
 */
@Service
@Slf4j
public class OutCallApiLogBeanServiceImpl implements OutCallApiLogBeanService {

    @Resource
    private OutCallApiLogBeanMapper outCallApiLogBeanMapper;

    /**
     * 新增日志记录
     * @Title: insertOutCallApiLogBean
     * @Description: (这里用一句话描述这个方法的作用)
     * @Param recordBean 参数说明
     * @return boolean    返回类型
     * @author yuchaohua
     * @date 2021/1/22 17:31
     */
    @Override
    public boolean insertOutCallApiLogBean(OutCallApiLogBean recordBean){
        if (recordBean == null){
            return false;
        }
        recordBean.setCreateTime(UtilDate.getDate());
        recordBean.setUpdateTime(UtilDate.getDate());
        return outCallApiLogBeanMapper.insertSelective(recordBean) > 0;
    }

}
